

package com.jy.rhin.facade.ws.basic.audit;

import cn.org.chiss.rhin._2015.basic.audit.AuditMessage;
import com.jy.rhin.application.basic.AuditService;
import com.jy.rhin.config.NamespaceConstants;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import javax.jws.WebService;

/**
 * @Description: 安全审计webservice实现
 * @Author: lww
 * @Date: 2022/5/20
 */
@WebService(
        serviceName = "AuditProvider",
        portName = "AuditWebserviceImplPort",
        targetNamespace = NamespaceConstants.NS_RHIN,
        endpointInterface = "com.jy.rhin.facade.ws.basic.audit.AuditProvider")
@Component
@Slf4j
public class AuditProviderPortImpl implements AuditProvider {


    @Resource
    AuditService auditService;

    /**
     * 安全审计
     *
     * @param auditMessage
     */
    @Override
    public void audit(AuditMessage auditMessage) {
        auditService.addAuditLog(auditMessage);
    }

}
